package com.deepblue.image.maker.exception;


import com.deepblue.image.maker.enums.BusinessEnum;

/**
 * @ClassName BusinessException
 * @Description
 * @Author yangxd
 * @Date 2021/8/19 13:44
 * @Version 1.0
 **/
public class BusinessException extends RuntimeException {

    private String code;

    public BusinessException(String code) {
        this.code = code;
    }

    public BusinessException(String message, String code) {
        super(message);
        this.code = code;
    }

    public BusinessException(BusinessEnum businessEnum) {
        super(businessEnum.getMsg());
        this.code = businessEnum.getCode();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
